﻿using Abp.Application.Services.Dto;
using Abp.Authorization.Roles;
using Abp.AutoMapper;
using AbpProjectTemplate.Domain.Roles;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace AbpProjectTemplate.Application.Roles.Dtos
{
    [AutoMapTo(typeof(Role))]
    public class RoleEditDto : EntityDto
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        [Required]
        [StringLength(AbpRoleBase.MaxDisplayNameLength)]
        public string DisplayName { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        [StringLength(Role.MaxDescriptionLength)]
        public string Description { get; set; }
        /// <summary>
        /// 是否默认角色（创建时默认选中）
        /// </summary>
        public bool IsDefault { get; set; }
        /// <summary>
        /// 授权权限
        /// </summary>
        public List<string> GrantedPermissions { get; set; }
    }
}


